Integrand size = 10, antiderivative size = 107 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^3} \, dx=-\frac {\left (8 a^2+8 a b+3 b^2\right ) \arctan \left (\frac {\sqrt {a+b} \cot (x)}{\sqrt {a}}\right )}{8 a^{5/2} (a+b)^{5/2}}-\frac {b \cos (x) \sin (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}-\frac {3 b (2 a+b) \cos (x) \sin (x)}{8 a^2 (a+b)^2 \left (a+b \cos ^2(x)\right )} \]
-1/8*(8*a^2+8*a*b+3*b^2)*arctan(cot(x)*(a+b)^(1/2)/a^(1/2))/a^(5/2)/(a+b)^ (5/2)-1/4*b*cos(x)*sin(x)/a/(a+b)/(a+b*cos(x)^2)^2-3/8*b*(2*a+b)*cos(x)*si n(x)/a^2/(a+b)^2/(a+b*cos(x)^2)
Time = 5.40 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.99 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^3} \, dx=\frac {\frac {\left (8 a^2+8 a b+3 b^2\right ) \arctan \left (\frac {\sqrt {a} \tan (x)}{\sqrt {a+b}}\right )}{(a+b)^{5/2}}-\frac {\sqrt {a} b \left (16 a^2+16 a b+3 b^2+3 b (2 a+b) \cos (2 x)\right ) \sin (2 x)}{(a+b)^2 (2 a+b+b \cos (2 x))^2}}{8 a^{5/2}} \]
(((8*a^2 + 8*a*b + 3*b^2)*ArcTan[(Sqrt[a]*Tan[x])/Sqrt[a + b]])/(a + b)^(5 /2) - (Sqrt[a]*b*(16*a^2 + 16*a*b + 3*b^2 + 3*b*(2*a + b)*Cos[2*x])*Sin[2* x])/((a + b)^2*(2*a + b + b*Cos[2*x])^2))/(8*a^(5/2))
Time = 0.46 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.12, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.900, Rules used = {3042, 3663, 25, 3042, 3652, 27, 3042, 3660, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {1}{\left (a+b \cos ^2(x)\right )^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\left (a+b \sin \left (x+\frac {\pi }{2}\right )^2\right )^3}dx\) |
\(\Big \downarrow \) 3663 |
\(\displaystyle -\frac {\int -\frac {-2 b \cos ^2(x)+4 a+3 b}{\left (b \cos ^2(x)+a\right )^2}dx}{4 a (a+b)}-\frac {b \sin (x) \cos (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {-2 b \cos ^2(x)+4 a+3 b}{\left (b \cos ^2(x)+a\right )^2}dx}{4 a (a+b)}-\frac {b \sin (x) \cos (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {-2 b \sin \left (x+\frac {\pi }{2}\right )^2+4 a+3 b}{\left (b \sin \left (x+\frac {\pi }{2}\right )^2+a\right )^2}dx}{4 a (a+b)}-\frac {b \sin (x) \cos (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}\) |
\(\Big \downarrow \) 3652 |
\(\displaystyle \frac {\frac {\int \frac {8 a^2+8 b a+3 b^2}{b \cos ^2(x)+a}dx}{2 a (a+b)}-\frac {3 b (2 a+b) \sin (x) \cos (x)}{2 a (a+b) \left (a+b \cos ^2(x)\right )}}{4 a (a+b)}-\frac {b \sin (x) \cos (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {\left (8 a^2+8 a b+3 b^2\right ) \int \frac {1}{b \cos ^2(x)+a}dx}{2 a (a+b)}-\frac {3 b (2 a+b) \sin (x) \cos (x)}{2 a (a+b) \left (a+b \cos ^2(x)\right )}}{4 a (a+b)}-\frac {b \sin (x) \cos (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\left (8 a^2+8 a b+3 b^2\right ) \int \frac {1}{b \sin \left (x+\frac {\pi }{2}\right )^2+a}dx}{2 a (a+b)}-\frac {3 b (2 a+b) \sin (x) \cos (x)}{2 a (a+b) \left (a+b \cos ^2(x)\right )}}{4 a (a+b)}-\frac {b \sin (x) \cos (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}\) |
\(\Big \downarrow \) 3660 |
\(\displaystyle \frac {-\frac {\left (8 a^2+8 a b+3 b^2\right ) \int \frac {1}{(a+b) \cot ^2(x)+a}d\cot (x)}{2 a (a+b)}-\frac {3 b (2 a+b) \sin (x) \cos (x)}{2 a (a+b) \left (a+b \cos ^2(x)\right )}}{4 a (a+b)}-\frac {b \sin (x) \cos (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {-\frac {\left (8 a^2+8 a b+3 b^2\right ) \arctan \left (\frac {\sqrt {a+b} \cot (x)}{\sqrt {a}}\right )}{2 a^{3/2} (a+b)^{3/2}}-\frac {3 b (2 a+b) \sin (x) \cos (x)}{2 a (a+b) \left (a+b \cos ^2(x)\right )}}{4 a (a+b)}-\frac {b \sin (x) \cos (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}\) |
-1/4*(b*Cos[x]*Sin[x])/(a*(a + b)*(a + b*Cos[x]^2)^2) + (-1/2*((8*a^2 + 8* a*b + 3*b^2)*ArcTan[(Sqrt[a + b]*Cot[x])/Sqrt[a]])/(a^(3/2)*(a + b)^(3/2)) - (3*b*(2*a + b)*Cos[x]*Sin[x])/(2*a*(a + b)*(a + b*Cos[x]^2)))/(4*a*(a + b))
3.1.43.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b - a*B))*Cos[e + f*x]*Sin[e + f*x ]*((a + b*Sin[e + f*x]^2)^(p + 1)/(2*a*f*(a + b)*(p + 1))), x] - Simp[1/(2* a*(a + b)*(p + 1)) Int[(a + b*Sin[e + f*x]^2)^(p + 1)*Simp[a*B - A*(2*a*( p + 1) + b*(2*p + 3)) + 2*(A*b - a*B)*(p + 2)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, e, f, A, B}, x] && LtQ[p, -1] && NeQ[a + b, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(-1), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f Subst[Int[1/(a + (a + b)*ff^2*x^ 2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Simp[(-b)*C os[e + f*x]*Sin[e + f*x]*((a + b*Sin[e + f*x]^2)^(p + 1)/(2*a*f*(p + 1)*(a + b))), x] + Simp[1/(2*a*(p + 1)*(a + b)) Int[(a + b*Sin[e + f*x]^2)^(p + 1)*Simp[2*a*(p + 1) + b*(2*p + 3) - 2*b*(p + 2)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a + b, 0] && LtQ[p, -1]
Time = 1.42 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.09
method | result | size |
default | \(\frac {-\frac {b \left (8 a +5 b \right ) \left (\tan ^{3}\left (x \right )\right )}{8 a \left (a^{2}+2 a b +b^{2}\right )}-\frac {\left (8 a +3 b \right ) b \tan \left (x \right )}{8 a^{2} \left (a +b \right )}}{{\left (a \left (\tan ^{2}\left (x \right )\right )+a +b \right )}^{2}}+\frac {\left (8 a^{2}+8 a b +3 b^{2}\right ) \arctan \left (\frac {a \tan \left (x \right )}{\sqrt {\left (a +b \right ) a}}\right )}{8 \left (a^{2}+2 a b +b^{2}\right ) a^{2} \sqrt {\left (a +b \right ) a}}\) | \(117\) |
risch | \(-\frac {i \left (8 a^{2} b \,{\mathrm e}^{6 i x}+8 a \,b^{2} {\mathrm e}^{6 i x}+3 b^{3} {\mathrm e}^{6 i x}+48 a^{3} {\mathrm e}^{4 i x}+72 a^{2} b \,{\mathrm e}^{4 i x}+42 a \,b^{2} {\mathrm e}^{4 i x}+9 b^{3} {\mathrm e}^{4 i x}+40 a^{2} b \,{\mathrm e}^{2 i x}+40 a \,b^{2} {\mathrm e}^{2 i x}+9 b^{3} {\mathrm e}^{2 i x}+6 a \,b^{2}+3 b^{3}\right )}{4 \left (a +b \right )^{2} a^{2} \left (b \,{\mathrm e}^{4 i x}+4 a \,{\mathrm e}^{2 i x}+2 b \,{\mathrm e}^{2 i x}+b \right )^{2}}-\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {2 i a^{2}+2 i a b +2 a \sqrt {-a^{2}-a b}+b \sqrt {-a^{2}-a b}}{b \sqrt {-a^{2}-a b}}\right )}{2 \sqrt {-a^{2}-a b}\, \left (a +b \right )^{2}}-\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {2 i a^{2}+2 i a b +2 a \sqrt {-a^{2}-a b}+b \sqrt {-a^{2}-a b}}{b \sqrt {-a^{2}-a b}}\right ) b}{2 \sqrt {-a^{2}-a b}\, \left (a +b \right )^{2} a}-\frac {3 \ln \left ({\mathrm e}^{2 i x}+\frac {2 i a^{2}+2 i a b +2 a \sqrt {-a^{2}-a b}+b \sqrt {-a^{2}-a b}}{b \sqrt {-a^{2}-a b}}\right ) b^{2}}{16 \sqrt {-a^{2}-a b}\, \left (a +b \right )^{2} a^{2}}+\frac {\ln \left ({\mathrm e}^{2 i x}-\frac {2 i a^{2}+2 i a b -2 a \sqrt {-a^{2}-a b}-b \sqrt {-a^{2}-a b}}{b \sqrt {-a^{2}-a b}}\right )}{2 \sqrt {-a^{2}-a b}\, \left (a +b \right )^{2}}+\frac {\ln \left ({\mathrm e}^{2 i x}-\frac {2 i a^{2}+2 i a b -2 a \sqrt {-a^{2}-a b}-b \sqrt {-a^{2}-a b}}{b \sqrt {-a^{2}-a b}}\right ) b}{2 \sqrt {-a^{2}-a b}\, \left (a +b \right )^{2} a}+\frac {3 \ln \left ({\mathrm e}^{2 i x}-\frac {2 i a^{2}+2 i a b -2 a \sqrt {-a^{2}-a b}-b \sqrt {-a^{2}-a b}}{b \sqrt {-a^{2}-a b}}\right ) b^{2}}{16 \sqrt {-a^{2}-a b}\, \left (a +b \right )^{2} a^{2}}\) | \(682\) |
(-1/8*b*(8*a+5*b)/a/(a^2+2*a*b+b^2)*tan(x)^3-1/8*(8*a+3*b)/a^2*b/(a+b)*tan (x))/(a*tan(x)^2+a+b)^2+1/8*(8*a^2+8*a*b+3*b^2)/(a^2+2*a*b+b^2)/a^2/((a+b) *a)^(1/2)*arctan(a*tan(x)/((a+b)*a)^(1/2))
Leaf count of result is larger than twice the leaf count of optimal. 276 vs. \(2 (93) = 186\).
Time = 0.29 (sec) , antiderivative size = 616, normalized size of antiderivative = 5.76 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^3} \, dx=\left [-\frac {{\left ({\left (8 \, a^{2} b^{2} + 8 \, a b^{3} + 3 \, b^{4}\right )} \cos \left (x\right )^{4} + 8 \, a^{4} + 8 \, a^{3} b + 3 \, a^{2} b^{2} + 2 \, {\left (8 \, a^{3} b + 8 \, a^{2} b^{2} + 3 \, a b^{3}\right )} \cos \left (x\right )^{2}\right )} \sqrt {-a^{2} - a b} \log \left (\frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (x\right )^{4} - 2 \, {\left (4 \, a^{2} + 3 \, a b\right )} \cos \left (x\right )^{2} + 4 \, {\left ({\left (2 \, a + b\right )} \cos \left (x\right )^{3} - a \cos \left (x\right )\right )} \sqrt {-a^{2} - a b} \sin \left (x\right ) + a^{2}}{b^{2} \cos \left (x\right )^{4} + 2 \, a b \cos \left (x\right )^{2} + a^{2}}\right ) + 4 \, {\left (3 \, {\left (2 \, a^{3} b^{2} + 3 \, a^{2} b^{3} + a b^{4}\right )} \cos \left (x\right )^{3} + {\left (8 \, a^{4} b + 13 \, a^{3} b^{2} + 5 \, a^{2} b^{3}\right )} \cos \left (x\right )\right )} \sin \left (x\right )}{32 \, {\left (a^{8} + 3 \, a^{7} b + 3 \, a^{6} b^{2} + a^{5} b^{3} + {\left (a^{6} b^{2} + 3 \, a^{5} b^{3} + 3 \, a^{4} b^{4} + a^{3} b^{5}\right )} \cos \left (x\right )^{4} + 2 \, {\left (a^{7} b + 3 \, a^{6} b^{2} + 3 \, a^{5} b^{3} + a^{4} b^{4}\right )} \cos \left (x\right )^{2}\right )}}, -\frac {{\left ({\left (8 \, a^{2} b^{2} + 8 \, a b^{3} + 3 \, b^{4}\right )} \cos \left (x\right )^{4} + 8 \, a^{4} + 8 \, a^{3} b + 3 \, a^{2} b^{2} + 2 \, {\left (8 \, a^{3} b + 8 \, a^{2} b^{2} + 3 \, a b^{3}\right )} \cos \left (x\right )^{2}\right )} \sqrt {a^{2} + a b} \arctan \left (\frac {{\left (2 \, a + b\right )} \cos \left (x\right )^{2} - a}{2 \, \sqrt {a^{2} + a b} \cos \left (x\right ) \sin \left (x\right )}\right ) + 2 \, {\left (3 \, {\left (2 \, a^{3} b^{2} + 3 \, a^{2} b^{3} + a b^{4}\right )} \cos \left (x\right )^{3} + {\left (8 \, a^{4} b + 13 \, a^{3} b^{2} + 5 \, a^{2} b^{3}\right )} \cos \left (x\right )\right )} \sin \left (x\right )}{16 \, {\left (a^{8} + 3 \, a^{7} b + 3 \, a^{6} b^{2} + a^{5} b^{3} + {\left (a^{6} b^{2} + 3 \, a^{5} b^{3} + 3 \, a^{4} b^{4} + a^{3} b^{5}\right )} \cos \left (x\right )^{4} + 2 \, {\left (a^{7} b + 3 \, a^{6} b^{2} + 3 \, a^{5} b^{3} + a^{4} b^{4}\right )} \cos \left (x\right )^{2}\right )}}\right ] \]
[-1/32*(((8*a^2*b^2 + 8*a*b^3 + 3*b^4)*cos(x)^4 + 8*a^4 + 8*a^3*b + 3*a^2* b^2 + 2*(8*a^3*b + 8*a^2*b^2 + 3*a*b^3)*cos(x)^2)*sqrt(-a^2 - a*b)*log(((8 *a^2 + 8*a*b + b^2)*cos(x)^4 - 2*(4*a^2 + 3*a*b)*cos(x)^2 + 4*((2*a + b)*c os(x)^3 - a*cos(x))*sqrt(-a^2 - a*b)*sin(x) + a^2)/(b^2*cos(x)^4 + 2*a*b*c os(x)^2 + a^2)) + 4*(3*(2*a^3*b^2 + 3*a^2*b^3 + a*b^4)*cos(x)^3 + (8*a^4*b + 13*a^3*b^2 + 5*a^2*b^3)*cos(x))*sin(x))/(a^8 + 3*a^7*b + 3*a^6*b^2 + a^ 5*b^3 + (a^6*b^2 + 3*a^5*b^3 + 3*a^4*b^4 + a^3*b^5)*cos(x)^4 + 2*(a^7*b + 3*a^6*b^2 + 3*a^5*b^3 + a^4*b^4)*cos(x)^2), -1/16*(((8*a^2*b^2 + 8*a*b^3 + 3*b^4)*cos(x)^4 + 8*a^4 + 8*a^3*b + 3*a^2*b^2 + 2*(8*a^3*b + 8*a^2*b^2 + 3*a*b^3)*cos(x)^2)*sqrt(a^2 + a*b)*arctan(1/2*((2*a + b)*cos(x)^2 - a)/(sq rt(a^2 + a*b)*cos(x)*sin(x))) + 2*(3*(2*a^3*b^2 + 3*a^2*b^3 + a*b^4)*cos(x )^3 + (8*a^4*b + 13*a^3*b^2 + 5*a^2*b^3)*cos(x))*sin(x))/(a^8 + 3*a^7*b + 3*a^6*b^2 + a^5*b^3 + (a^6*b^2 + 3*a^5*b^3 + 3*a^4*b^4 + a^3*b^5)*cos(x)^4 + 2*(a^7*b + 3*a^6*b^2 + 3*a^5*b^3 + a^4*b^4)*cos(x)^2)]
Timed out. \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^3} \, dx=\text {Timed out} \]
Time = 0.39 (sec) , antiderivative size = 186, normalized size of antiderivative = 1.74 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^3} \, dx=\frac {{\left (8 \, a^{2} + 8 \, a b + 3 \, b^{2}\right )} \arctan \left (\frac {a \tan \left (x\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{8 \, {\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )} \sqrt {{\left (a + b\right )} a}} - \frac {{\left (8 \, a^{2} b + 5 \, a b^{2}\right )} \tan \left (x\right )^{3} + {\left (8 \, a^{2} b + 11 \, a b^{2} + 3 \, b^{3}\right )} \tan \left (x\right )}{8 \, {\left (a^{6} + 4 \, a^{5} b + 6 \, a^{4} b^{2} + 4 \, a^{3} b^{3} + a^{2} b^{4} + {\left (a^{6} + 2 \, a^{5} b + a^{4} b^{2}\right )} \tan \left (x\right )^{4} + 2 \, {\left (a^{6} + 3 \, a^{5} b + 3 \, a^{4} b^{2} + a^{3} b^{3}\right )} \tan \left (x\right )^{2}\right )}} \]
1/8*(8*a^2 + 8*a*b + 3*b^2)*arctan(a*tan(x)/sqrt((a + b)*a))/((a^4 + 2*a^3 *b + a^2*b^2)*sqrt((a + b)*a)) - 1/8*((8*a^2*b + 5*a*b^2)*tan(x)^3 + (8*a^ 2*b + 11*a*b^2 + 3*b^3)*tan(x))/(a^6 + 4*a^5*b + 6*a^4*b^2 + 4*a^3*b^3 + a ^2*b^4 + (a^6 + 2*a^5*b + a^4*b^2)*tan(x)^4 + 2*(a^6 + 3*a^5*b + 3*a^4*b^2 + a^3*b^3)*tan(x)^2)
Time = 0.30 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.39 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^3} \, dx=\frac {{\left (\pi \left \lfloor \frac {x}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (x\right )}{\sqrt {a^{2} + a b}}\right )\right )} {\left (8 \, a^{2} + 8 \, a b + 3 \, b^{2}\right )}}{8 \, {\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )} \sqrt {a^{2} + a b}} - \frac {8 \, a^{2} b \tan \left (x\right )^{3} + 5 \, a b^{2} \tan \left (x\right )^{3} + 8 \, a^{2} b \tan \left (x\right ) + 11 \, a b^{2} \tan \left (x\right ) + 3 \, b^{3} \tan \left (x\right )}{8 \, {\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )} {\left (a \tan \left (x\right )^{2} + a + b\right )}^{2}} \]
1/8*(pi*floor(x/pi + 1/2)*sgn(a) + arctan(a*tan(x)/sqrt(a^2 + a*b)))*(8*a^ 2 + 8*a*b + 3*b^2)/((a^4 + 2*a^3*b + a^2*b^2)*sqrt(a^2 + a*b)) - 1/8*(8*a^ 2*b*tan(x)^3 + 5*a*b^2*tan(x)^3 + 8*a^2*b*tan(x) + 11*a*b^2*tan(x) + 3*b^3 *tan(x))/((a^4 + 2*a^3*b + a^2*b^2)*(a*tan(x)^2 + a + b)^2)
Time = 3.06 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.15 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^3} \, dx=\frac {\mathrm {atan}\left (\frac {\sqrt {a}\,\mathrm {tan}\left (x\right )}{\sqrt {a+b}}\right )\,\left (8\,a^2+8\,a\,b+3\,b^2\right )}{8\,a^{5/2}\,{\left (a+b\right )}^{5/2}}-\frac {\frac {\mathrm {tan}\left (x\right )\,\left (3\,b^2+8\,a\,b\right )}{8\,a^2\,\left (a+b\right )}+\frac {{\mathrm {tan}\left (x\right )}^3\,\left (5\,b^2+8\,a\,b\right )}{8\,a\,{\left (a+b\right )}^2}}{2\,a\,b+{\mathrm {tan}\left (x\right )}^2\,\left (2\,a^2+2\,b\,a\right )+a^2\,{\mathrm {tan}\left (x\right )}^4+a^2+b^2} \]